import { createApp } from 'vue'

import Cookies from 'js-cookie'

import Element from 'element-plus'
import 'element-plus/dist/index.css'


import App from './App.vue'
import router from './router'
import store from './store'

import SvgIcon from '@/components/SvgIcon'// svg component

// import SvgIcon from './icons' // icon
import './icons' // icon
import './permission' // permission control

if (process.env.NODE_ENV === 'development') {
  const startMirage = require('../mirage')
  startMirage()
}

createApp(App)
.use(store)
.use(router)
.component('svg-icon', SvgIcon)
.use(Element, {
    size: Cookies.get('size') || 'medium'
  })
.mount('#app')

